<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <h1>{{message}}</h1>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script>
    var vm = new Vue({
        el: '#app',
        data: {
            message: 'Vue的生命周期'
        },
        created: function () {
            console.group('---------created创建完毕状态-----------')
            console.log("el:"+this.$el);
            console.log("data:"+this.$data);
            console.log("message:"+this.message);
        },
        beforeMount: function () {
            console.group('---------beforeMount挂截前状态-----------')
            console.log("el:"+this.$el);
            console.log("data:"+this.$data);
            console.log("message:"+this.message);
        }
    })
</script>
</body>
</html>